package com.interview.ujiuye1;

/**
 * Copyright (C), 2018-2020
 * FileName: MyData
 * Author:   kongfanyu
 * Date:     2020/10/9 20:14
 */
public class MyData {
    volatile int num = 0;

    public void addTo60(){
        this.num = 60;
    }

    public  void addPlusPlus(){
        synchronized (this){
            this.num ++;
        }

    }
}
